dispatch

open suspend fun dispatch(request: ResolvedRequestObject, consensus: Consensus, encryptionParameters: EncryptionParameters?): DispatchOutcome(source)

Assembles an appropriate authorization response given a request and holder's consensus and then dispatches it to the verifier.

If ResolvedRequestObject.responseMode is ResponseMode.Query, ResponseMode.QueryJwt, ResponseMode.Fragment or ResponseMode.FragmentJwt dispatching takes the form of a redirect URI having the response encoded. Wallet should redirect to this URI

If ResolvedRequestObject.responseMode is ResponseMode.DirectPost or ResponseMode.DirectPostJwt then dispatching takes the form of an actual post. The returned DispatchOutcome.VerifierResponse contains the verifier's reply after receiving the post.

Return

the dispatch outcome as described above

Parameters

request

The request to reply to

consensus

Holder's consensus (positive or negative) to this request